#define _CRT_SECURE_NO_WARNINGS 1
#include <stdlib.h>
#include <stdio.h>
int douhao(int a,char* arr) {
	int n = 0;
	int m = 0;
	while (a > 0)
	{
		if (m != 0 && m % 3 == 0)
			arr[n++] = ',';
		arr[n++] = a % 10 + '0';
		a /= 10;
		m++;
	}
	return n;
}
int main()
{
	int n;
	scanf("%d", &n);
	char* arr = (char*)calloc(sizeof(char) , 20);
	int m = douhao(n, arr);
	while (m >= 0)
	{
		printf("%c", arr[m--]);
	}
	free(arr);
	arr = NULL;
}